package com.ruoyi.ldzlsb.domain;

import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 保养计划对象 sb_maintenance_plan
 * 
 * @author anli
 * @date 2025-01-11
 */
public class SbMaintenancePlan extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 计划ID */
    private Long planId;

    /** 计划编号 */
    @Excel(name = "计划编号")
    private String planCode;

    // 默认构造函数
    public SbMaintenancePlan()
    {
    }

    public SbMaintenancePlan(String planCode)
    {
        this.planCode = planCode;
    }

    public SbMaintenancePlan(Long planId)
    {
        this.planId = planId;
    }

    /** 计划名称 */
    @Excel(name = "计划名称")
    private String planName;

    /** 保养配置ID */
    @Excel(name = "保养配置ID")
    private Long configId;
    
    /** 设备类型ID - 兼容旧版本API */
    private Long typeId;

    /** 保养配置名称 */
    @Excel(name = "保养配置名称")
    private String configName;
    
    /** 保养配置对象 */
    private SbMaintenanceConfig config;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Long equipmentId;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String equipmentName;

    /** 设备对象 */
    private SbEquipment equipment;

    /** 保养周期类型（1每天 2每周 3每月 4每季度 5每年） */
    @Excel(name = "保养周期类型", readConverterExp = "1=每天,2=每周,3=每月,4=每季度,5=每年")
    private String cycleType;

    /** 保养周期值 - 兼容旧版本API */
    private Integer cycleValue;

    /** 保养日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保养日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date maintenanceDate;

    /** 计划开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 计划结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 保养人员ID */
    private Long maintainerId;

    /** 保养人员名称 */
    @Excel(name = "保养人员")
    private String maintainerName;

    /** 负责部门ID */
    private Long deptId;

    /** 负责部门名称 */
    @Excel(name = "负责部门")
    private String deptName;

    /** 状态（0停用 1启用） */
    @Excel(name = "状态", readConverterExp = "0=停用,1=启用")
    private String planStatus;

    /** 删除标志（0代表存在 1代表删除） */
    private String isDelete;

    /** 是否自动生成保养单（0否 1是） */
    @Excel(name = "是否自动生成保养单", readConverterExp = "0=否,1=是")
    private String autoGenerate;
    
    /** 下次保养日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下次保养日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date nextMaintenanceDate;
    
    /** 已生成的保养单 */
    private List<SbMaintenanceRecord> maintenanceRecords;

    /** 备注 */
    private String remark;
    
    /** 周期配置JSON数据 */
    private String cycleConfigJson;

    public void setCycleConfigJson(String cycleConfigJson)
    {
        this.cycleConfigJson = cycleConfigJson;
    }

    public String getCycleConfigJson()
    {
        return cycleConfigJson;
    }

    public void setPlanId(Long planId) 
    {
        this.planId = planId;
    }

    public Long getPlanId() 
    {
        return planId;
    }

    public void setPlanCode(String planCode) 
    {
        this.planCode = planCode;
    }

    public String getPlanCode() 
    {
        return planCode;
    }

    public void setPlanName(String planName) 
    {
        this.planName = planName;
    }

    public String getPlanName() 
    {
        return planName;
    }

    public void setConfigId(Long configId)
    {
        this.configId = configId;
    }

    public Long getConfigId()
    {
        return configId;
    }

    public void setTypeId(Long typeId)
    {
        this.typeId = typeId;
    }

    public Long getTypeId()
    {
        return typeId;
    }

    public void setConfigName(String configName)
    {
        this.configName = configName;
    }

    public String getConfigName()
    {
        return configName;
    }

    public void setConfig(SbMaintenanceConfig config)
    {
        this.config = config;
    }

    public SbMaintenanceConfig getConfig()
    {
        return config;
    }

    public void setEquipmentId(Long equipmentId) 
    {
        this.equipmentId = equipmentId;
    }

    public Long getEquipmentId() 
    {
        return equipmentId;
    }

    public void setEquipmentName(String equipmentName) 
    {
        this.equipmentName = equipmentName;
    }

    public String getEquipmentName() 
    {
        return equipmentName;
    }

    public void setEquipment(SbEquipment equipment)
    {
        this.equipment = equipment;
    }

    public SbEquipment getEquipment()
    {
        return equipment;
    }

    public void setCycleType(String cycleType)
    {
        this.cycleType = cycleType;
    }

    public String getCycleType()
    {
        return cycleType;
    }

    public void setCycleValue(Integer cycleValue)
    {
        this.cycleValue = cycleValue;
    }

    public Integer getCycleValue()
    {
        return cycleValue;
    }

    public void setMaintenanceDate(Date maintenanceDate)
    {
        this.maintenanceDate = maintenanceDate;
    }

    public Date getMaintenanceDate()
    {
        return maintenanceDate;
    }

    public void setStartDate(Date startDate)
    {
        this.startDate = startDate;
    }

    public Date getStartDate()
    {
        return startDate;
    }

    public void setEndDate(Date endDate)
    {
        this.endDate = endDate;
    }

    public Date getEndDate()
    {
        return endDate;
    }

    public void setMaintainerId(Long maintainerId)
    {
        this.maintainerId = maintainerId;
    }

    public Long getMaintainerId()
    {
        return maintainerId;
    }

    public void setMaintainerName(String maintainerName)
    {
        this.maintainerName = maintainerName;
    }

    public String getMaintainerName()
    {
        return maintainerName;
    }

    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getDeptId()
    {
        return deptId;
    }

    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }

    public String getDeptName()
    {
        return deptName;
    }

    public void setPlanStatus(String planStatus) 
    {
        this.planStatus = planStatus;
    }

    public String getPlanStatus() 
    {
        return planStatus;
    }

    public void setIsDelete(String isDelete) 
    {
        this.isDelete = isDelete;
    }

    public String getIsDelete() 
    {
        return isDelete;
    }

    public void setAutoGenerate(String autoGenerate)
    {
        this.autoGenerate = autoGenerate;
    }

    public String getAutoGenerate()
    {
        return autoGenerate;
    }

    public void setNextMaintenanceDate(Date nextMaintenanceDate)
    {
        this.nextMaintenanceDate = nextMaintenanceDate;
    }

    public Date getNextMaintenanceDate()
    {
        return nextMaintenanceDate;
    }

    public void setMaintenanceRecords(List<SbMaintenanceRecord> maintenanceRecords)
    {
        this.maintenanceRecords = maintenanceRecords;
    }

    public List<SbMaintenanceRecord> getMaintenanceRecords()
    {
        return maintenanceRecords;
    }

    public void setRemark(String remark)
    {
        this.remark = remark;
    }

    public String getRemark()
    {
        return remark;
    }
} 